﻿@using Webdiyer.WebControls.Mvc
@model PagedList<Dyd.BaseService.Monitor.Domain.Cluster.Model.tb_performance_collect_model>
@{
    ViewBag.Title = "服务器日性能表";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="head">
    <div class="title">
        服务器日性能表
    </div>
</div>
<div class="orderlist m10 myorder">
    @*@using (Ajax.BeginForm("index", new RouteValueDictionary { { "id", "" } }, new AjaxOptions { UpdateTargetId = "List", HttpMethod = "post", InsertionMode = InsertionMode.Replace }, new RouteValueDictionary { { "id", "searchForm" } }))*@
    @using (Html.BeginForm("index", "PerformanceCollect", FormMethod.Get, new RouteValueDictionary { { "id", "searchForm" } }))      
    {
        <div class="item_list pt10">
            <div class="item_list">
                <ul>
                    <li>
                        <label>服务器ip</label>
                        <input type="text" name="serverip"  class="smalltext"  value="@ViewBag.serverip" />
                    </li>
                    <li>
                        <label>服务器id</label>
                        <input type="text" name="serverid"  class="smalltext"  value="@ViewBag.serverid" />
                    </li>
                   
                    <li>
                        <label>时间</label><input type="text" id="searchTimeLong"  class="smalltext" name="timebegin" value="@ViewBag.timebegin" /> - <input type="text" id="searchTimeLong"  class="smalltext"  name="timeend" value="@ViewBag.timeend" />（必须同一天）
                    </li>
                    <li>
                        <label>降序</label>
                        <select name="orderby">
                            <option value="">创建时间</option>
                            <option value="cpu" @(ViewBag.orderby+""=="cpu"?"selected='selected'":"")>cpu</option>
                            <option value="memory" @(ViewBag.orderby+""=="memory"?"selected='selected'":"")>可用内存</option>
                            <option value="networkupload" @(ViewBag.orderby+""=="networkupload"?"selected='selected'":"")>上传流量</option>
                            <option value="networkdownload" @(ViewBag.orderby+""=="networkdownload"?"selected='selected'":"")>下载流量</option>
                            <option value="ioread" @(ViewBag.orderby+""=="ioread"?"selected='selected'":"")>磁盘读</option>
                            <option value="iowrite" @(ViewBag.orderby+""=="iowrite"?"selected='selected'":"")>磁盘写</option>
                            <option value="iisrequest" @(ViewBag.orderby+""=="iisrequest"?"selected='selected'":"")>iis请求</option>
                        </select>
                    </li>
                    <li class="search">
                        <input type="submit" class="btn1" value="搜索" accesskey="S" /></li>
@*                    <li><a href="@Url.Action("Chart")">查看图表</a></li>*@
                </ul>
            </div>
        </div>
    }
    <div class="tab_cont">
        <div class="List">
            @Html.Partial("List",Model)
        </div>
    </div>
</div>
<input type="hidden" id="json" value="@Newtonsoft.Json.JsonConvert.SerializeObject(Model).Replace("\r\n","");" />
<div id="chart_wrapper" class="ml10 mt10">
        <div id="maychart" style="height: 400px;"></div>
    </div>
<script src="~/Scripts/Highcharts-4.0.3/js/highcharts.js"></script>
<script src="~/Scripts/HighChartPack.js"></script>
<script>
    $(document).ready(function () {
        var pack = new HighChartPack();
        pack.Init($("#json").val(), "服务器", "服务器", 0);
    });
</script>